﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:System="clr-namespace:System;assembly=mscorlib"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <Style TargetType="Button">
        <Setter Property="Background" Value="#FF008AE7"/>
        <Setter Property="Foreground" Value="#FFFFFFFF"/>
        <Setter Property="Padding" Value="1"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="BorderBrush" Value="{x:Null}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal">
                                </VisualState>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ColorAnimation Duration="0:0:0.5" To="#FF0075C5" Storyboard.TargetProperty="(UIElement.Background).(SolidColorBrush.Color)" Storyboard.TargetName="Background"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ColorAnimation Duration="0:0:0.5" To="#FF0075C5" Storyboard.TargetProperty="(UIElement.Background).(SolidColorBrush.Color)" Storyboard.TargetName="Background"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ColorAnimation Duration="0:0:0.5" To="#01000000" Storyboard.TargetProperty="(UIElement.Background).(SolidColorBrush.Color)" Storyboard.TargetName="Background"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <ColorAnimation Duration="0:0:0.5" To="#FF0075C5" Storyboard.TargetProperty="(UIElement.Background).(SolidColorBrush.Color)" Storyboard.TargetName="Background"/>
                                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualElement"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused">
                                    <Storyboard>
                                        <ColorAnimation Duration="0:0:0.5" To="#FF008AE7" Storyboard.TargetProperty="(UIElement.Background).(SolidColorBrush.Color)" Storyboard.TargetName="Background"/>
                                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualElement"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="Background" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="1">
                        </Border>
                        <ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        <Rectangle x:Name="DisabledVisualElement" Fill="#FFFFFFFF" IsHitTestVisible="false" Opacity="0" RadiusY="1" RadiusX="1"/>
                        <Rectangle x:Name="FocusVisualElement" IsHitTestVisible="false" Margin="0" Opacity="0" RadiusY="1" Fill="{x:Null}" Stroke="{TemplateBinding BorderBrush}" RadiusX="1" StrokeThickness="1"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
